import {getLodop} from '../lodop.js'

export function doPrintTicket(){
	let LODOP = getLodop();
	if (LODOP != null && typeof LODOP.VERSION != 'undefined') {
		LODOP.PRINT_INIT('');
		LODOP.SET_PRINT_PAGESIZE(3, '58mm', '10mm', 'CreateCustomPage');
		LODOP.SET_PRINT_STYLE('FontSize', 15); // 设置打印字体
		LODOP.SET_PRINT_STYLE('Bold', 1); // 设置加粗
		LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Height:90%');
		LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width');
	
		//var strHTML = document.getElementById('box').innerHTML;
		let html = this.$refs['ticket']
		LODOP.ADD_PRINT_HTM(10, 10, '100%', '70%', html);
		//LODOP.PRINT();
		LODOP.PREVIEW();
	}
}